
#ifndef _TTG_SAMPLE_TYPES_
#define _TTG_SAMPLE_TYPES_

class Layer
{
	private:
		float *data;
		size_t width, height;
		float norm;
	public:
		inline Layer(size_t width, size_t height)
		{
			this->width = width;
			this->height = height;
			data = new float[width * height];
		}
		inline size_t getWidth() const
				{ return width; }
		inline size_t getHeight() const
				{ return height; }
		inline float getNorm() const
				{ return norm; }
		inline void setNorm(float norm)
				{ this->norm = norm; }
		inline float &operator() (size_t x, size_t y)
				{ return data(x + Y * width); }
		~Layer()
				{ delete[] data; }
};

class LayerPart
{
	private:
		Layer *src;
		Layer *dst;
		size_t x_start, x_end;
		size_t y_start, y_end;
	public:
		LayerPart(Layer *src, Layer *dst,
				  size_t x_start, size_t x_end,
				  size_t y_start, size_t y_end)
		{
			this->src = src;
			this->dst = dst;
			this->x_start = x_start;
			this->x_end = x_end;
			this->y_start = y_start;
			this->y_end = y_end;
		}
		
};

#endif
